<?xml version='1.0' encoding='UTF-8' ?> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.prime.com.tr/ui"
      xmlns:f="http://java.sun.com/jsf/core">
    <h:head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <link href="/Gepro/resources/css/default.css" rel="stylesheet" type="text/css" />
        <link href="/Gepro/resources/css/cssLayout.css" rel="stylesheet" type="text/css" />
        <link href="/Gepro/resources/css/alteracoesPrime.css" rel="stylesheet" type="text/css" />

        <title>Entrar -->> GEPRO</title>
    </h:head>
    <h:body>
        <p:layout fullPage="true">
            <p:layoutUnit position="top" height="120" 
                          header="" resizable="false" closable="false" collapsible="false">
                <h:outputText value="GEPRO" />
                <img class="banner" src="/Gepro/img/banner.jpg"/>
            </p:layoutUnit>

            <p:layoutUnit position="center" scrollable="true">
               
                <h1><h:outputText id="bemVindo" value="Bem vindo(a) ao GEPRO. Clique na imagem para fazer login." style="color: black"/></h1>
                <h:outputLink id="loginLink" value="javascript:void(0)" onclick="dlg.show()" title="login">     
                    <p:graphicImage value="/img/gep2.jpg" height="250px" width="250px"/> 

                </h:outputLink>  
                
                
                <p:growl id="growl" showDetail="true" life="3000" />  

                <p:dialog id="dialog" header="Login" widgetVar="dlg">  
                    <h:form id="formLogin">
                        
                        <h1><h:outputText id="bemVindo" value="Bem vindo(a) ao GEPRO." style="color: black"/></h1>
                        <h:panelGrid id="gridLoginSenha" columns="3">

                            <h:outputText id="loginLabel" value="Login:"/>
                            <p:inputText id="login" value="#{usuario.usuario.userlogin}" required="true" requiredMessage="Campo Login Obrigatório">
                                <!--f:validateLength minimum="3"/-->
                            </p:inputText>
                            <p:message for="loginLabel"/>

                            <h:outputText id="senhaLabel" value="Senha:"/>
                            <p:password value="#{usuario.usuario.senha}" feedback="false" minLength="6" required="true" requiredMessage="Campo Senha Obrigatório"/>
                            <p:message for="senhaLabel"/>

                        </h:panelGrid>
                        <h:commandButton id="botao" value="Entrar" action="#{usuario.doEfetuarLogin}"/>
                    </h:form>
                </p:dialog>  

                <!--script type="text/javascript">  
                    function handleLoginRequest(xhr, status, args) {  
                        if(args.validationFailed || !args.loggedIn) {  
                            jQuery('#dialog').parent().effect("shake", { times:3 }, 100);  
                        } else {  
                            dlg.hide();  
                            jQuery('#loginLink').fadeOut();  
                        }  
                    }  
                </script-->             

            </p:layoutUnit>
            <p:layoutUnit position="bottom" height="75" header="" resizable="false" closable="false" collapsible="true">
                <h:outputText value="Desenvolvido por TADS20091" />
            </p:layoutUnit>


        </p:layout>
    </h:body>
</html>